<?php
include_once("include/include.php.inc");
html_header("Assign Ticket");
echo "<div class='box'>\n"; 
echo " <div class='boxtop'><div></div></div>\n"; 
echo "  <div class='boxcontent'>\n"; 
/*   $backlink=getenv('HTTP_REFERER');*/

    if (empty($_POST['solution'])){
    	die("Solution Cannot Be Blank");
    }
    
	if (isset($_POST['tic_no'])) {
      $mtic_no = $_POST['tic_no'];
	} else {
      $mtic_no = $_GET['tic_no'];   
    }

    
      $msolution = $_POST['solution'];
      $result = "UPDATE chd_tickets SET tic_solution='$msolution', tic_status='C', tic_pro_date=CURDATE( ), tic_pro_time=CURTIME( ) WHERE tic_no=$mtic_no";
      $action = mysql_query($result)
              OR DIE("SELECT Error :".msql_error());
/*               if (FALSE === ($action = mysql_query($result)))
              {
                  print mysql_error()."<br />";
                  print $result;
              }*/

      print "<center>Ticket Closed.</center>";
/*}
   else
     print "<center>No Ticket# Passed!!! Error!!!!.</center>";*/

echo "  </div>\n"; 
echo " <div class='boxbottom'><div></div></div>\n"; 
echo "</div>\n"; 
echo "\n";
   html_footer();
?>
